cc.Class({
    extends: cc.Component,

    properties: {
        content:{
            default:null,
            type:cc.Node
        },
        list:cc.Prefab
    },

    // use this for initialization
    onLoad: function () {
        this.items = [
            {awaname:'将品名称',time:'9-11'},
            {awaname:'将品名称',time:'9-11'},
            {awaname:'将品名称',time:'9-11'},
            {awaname:'将品名称',time:'9-11'},
            {awaname:'将品名称',time:'9-11'},
            {awaname:'将品名称',time:'9-11'},
            {awaname:'将品名称',time:'9-11'},
            {awaname:'将品名称',time:'9-11'},
            {awaname:'将品名称',time:'9-11'},
            {awaname:'将品名称',time:'9-11'},
            {awaname:'将品名称',time:'9-11'},
            {awaname:'将品名称',time:'9-11'}
        ];
        for (var i = 0; i < this.items.length; ++i) {
            var item = cc.instantiate(this.list);
            var data = this.items[i];
            this.content.addChild(item);
            item.getComponent('awaList').init({
                awaname: data.awaname,
                time: data.time,
            });
        }
    },

    show:function(){
        this.node.active = true;
    },

    hide:function(){
        this.node.active = false;
    },

    // called every frame, uncomment this function to activate update callback
    // update: function (dt) {

    // },
});
